package com.stu.aspectj;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestAop {
	ApplicationContext context=new ClassPathXmlApplicationContext("com/zm/aspectj/string-aop.xml");
	@Test
	public void test() {
		AspectBiz asp=(AspectBiz)context.getBean("aspectBiz");
		asp.biz();
	}
	@Test
	public void testInit() {
		AspectBiz asp=(AspectBiz) context.getBean("aspectBiz");
		asp.init("zm", 3);
	}
	@Test
	public void testFit() {
		Fit fit=(Fit) context.getBean("aspectBiz");
		fit.filter();
	}
}
